home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Just Call Me Internet
/
Just Call Me Internet.iso
/
prog
/
atari
/
m2
/
cat3src
/
magic
/
d
/
magicaes.d
< prev
next >
Wrap
Text File
|
1997-10-26
|
42KB
|
1,143 lines
(*--------------------------------------------------------------------------*
* *
* MAGIC Modula's All purpose GEM Interface Cadre *
* ÿ ÿ ÿ ÿ ÿ *
*--------------------------------------------------------------------------*
* VERSION 3.20 18.01.1992 (C)90/91/92 by Peter Hellinger Software *
*--------------------------------------------------------------------------*
* Dieses Modul ist urheberrechtlich geschtzt. *
* *
* Die Verffentlichung des Quelltextes oder Teilen daraus in schriftlicher *
* Form, insbesondere in Zeitschriften, sowie die Verbreitung ber Public- *
* Domain-Hndler bedarf der ausdrcklichen schriftlichen Genehmigung des *
* Autors! *
* *
* Der Autor gibt hiermit die ausdrckliche Erlaubnis, das Modul jederzeit *
* auch im Quelltext weiterzugegeben, sofern dessen Text und insbesondere *
* dieser Urheberrechts-Vermerk nicht verndert wird, und durch die Weiter- *
* gabe kein finanzieller Nutzen entsteht. Der Autor behlt sich das Recht *
* vor, diese Erlaubnis jederzeit u. ohne Angaben von Grnden zu widerrufen *
*--------------------------------------------------------------------------*)
(*--------------------------------------------------------------------------*
* MagicAES Application Environment Services Modula-2 Interface *
*--------------------------------------------------------------------------*)
DEFINITION MODULE MagicAES;
FROM MagicSys IMPORT Nil, Null, Bit0, Bit1, Bit2, Bit3, Bit4, Bit5, Bit6,
Bit7, Bit8, Bit9, Bit10, Bit11, Bit12, Bit13, Bit14,
Bit15, LOC, Byte, ByteSet, sWORD, sINTEGER, sCARDINAL,
sBITSET, lINTEGER, lCARDINAL, lWORD, lBITSET;
IMPORT SYSTEM;
CONST MouseLeft = Bit0; (* Maustasten *)
MouseRight = Bit1;
TYPE AESGLOBAL = RECORD
apVersion: sCARDINAL;
apCount: sINTEGER;
apId: sCARDINAL;
apPprivate: lCARDINAL;
apPtree: SYSTEM.ADDRESS;
apPmem: SYSTEM.ADDRESS;
apLmem: sCARDINAL;
apNplanes: sCARDINAL;
Reserved1: sCARDINAL;
Reserved2: sCARDINAL;
apBvdisk: sBITSET;
apBvhard: sBITSET;
END;
TYPE tControl = RECORD
opcode: sINTEGER;
sizeIntIn: sINTEGER;
sizeIntOut: sINTEGER;
sizeAddrIn: sINTEGER;
sizeAddrOut: sINTEGER;
END;
TYPE tIntIn = ARRAY [0..16] OF sINTEGER;
tIntOut = ARRAY [0.. 7] OF sINTEGER;
tAddrIn = ARRAY [0.. 2] OF SYSTEM.ADDRESS;
tAddrOut = ARRAY [0.. 1] OF SYSTEM.ADDRESS;
VAR AESControl: tControl;
AESGlobal: AESGLOBAL;
AESIntIn: tIntIn;
AESIntOut: tIntOut;
AESAddrIn: tAddrIn;
AESAddrOut: tAddrOut;
VAR AESPB: RECORD
cbControl: POINTER TO tControl;
cbPglobal: POINTER TO AESGLOBAL;
cbPintin: POINTER TO tIntIn;
cbPintout: POINTER TO tIntOut;
cbPadrin: POINTER TO tAddrIn;
cbPadrout: POINTER TO tAddrOut;
END;
VAR CallResult: sINTEGER;
(* Enthlt nach einem AESCall den eventuellen Fehlercode *)
hasAgi: BOOLEAN;
(* Gibt an, ob appl_getinfo mglich ist. Mu extern gesetzt
* werden, da man es erst nach appl_init abfragen kann
*)
PROCEDURE AESCall (op, c1, c2, c3, c4: sINTEGER): sINTEGER;
(*-- AES-Objc --------------------------------------------------------*)
CONST GBOX = 20;
GTEXT = 21;
GBOXTEXT = 22;
GIMAGE = 23;
GPROGDEF = 24;
GIBOX = 25;
GBUTTON = 26;
GBOXCHAR = 27;
GSTRING = 28;
GFTEXT = 29;
GFBOXTEXT = 30;
GICON = 31;
GTITLE = 32;
GCICON = 33;
CONST SELECTABLE = Bit0;
DEFAULT = Bit1;
Exit = Bit2; (* EXIT ist reserviertes Wort... *)
EDITABLE = Bit3;
RBUTTON = Bit4;
LASTOB = Bit5;
TOUCHEXIT = Bit6;
HIDETREE = Bit7;
INDIRECT = Bit8;
FL3DIND = Bit9;
FL3DBAK = Bit10;
CONST SELECTED = Bit0;
CROSSED = Bit1;
CHECKED = Bit2;
DISABLED = Bit3;
OUTLINED = Bit4;
SHADOWED = Bit5;
DRAW3D = Bit6;
WHITEBAK = Bit7;
CONST WHITE = 0; (* Farben *)
BLACK = 1;
RED = 2;
GREEN = 3;
BLUE = 4;
CYAN = 5;
YELLOW = 6;
MAGENTA = 7;
LWITHE = 8;
LBLACK = 9;
LRED = 10;
LGREEN = 11;
LBLUE = 12;
LCYAN = 13;
LYELLOW = 14;
LMAGENTA = 15;
TYPE BoxInfo = RECORD
char: CHAR; (* Bit 24..31 *)
frame: CHAR; (* Bit 16..23 *)
flags: sBITSET; (* Bit0..Bit3: Innenfarbe (0..15)
* Bit4..Bit6: Raster
* Bit7: Text transparent oder deckend
* Bit8..Bit11: Textfarbe
* Bit12..Bit15: Rahmenfarbe
*)
END;
TYPE PtrSTRING = POINTER TO ARRAY [0..255] OF CHAR;
CONST (* Ab AES V 4.1 *)
GDOS_PROP = 0; (* Speedo GDOS font *)
GDOS_MONO = 1; (* Speedo GDOS font, force monospace output *)
GDOS_BITM = 2; (* GDOS bit map font *)
IBM = 3; (* System font *)
SMALL = 5; (* Small system font *)
TYPE PtrTEDINFO = POINTER TO TEDINFO;
TEDINFO = RECORD
tePtext: POINTER TO ARRAY [0..255] OF CHAR;
tePtmplt: POINTER TO ARRAY [0..255] OF CHAR;
tePvalid: POINTER TO ARRAY [0..255] OF CHAR;
teFont: sINTEGER;
teFontid: sINTEGER; (* erst ab AES 4.1, vorher reserved *)
teJust: sINTEGER;
teColor: sINTEGER;
teFontsize: sINTEGER; (* erst ab AES 4.1, vorher reserved *)
teThickness: sINTEGER;
teTxtlen: sINTEGER;
teTmplen: sINTEGER;
END;
TYPE PtrBITBLK = POINTER TO BITBLK;
BITBLK = RECORD
biData: SYSTEM.ADDRESS;
biWb: sINTEGER;
biHl: sINTEGER;
biX: sINTEGER;
biY: sINTEGER;
biColor: sINTEGER;
END;
TYPE PtrPARMBLK = POINTER TO PARMBLK;
PARMBLK = RECORD
pbTree: SYSTEM.ADDRESS;
pbObj: sINTEGER;
prPrevstate: sBITSET;
prCurrstate: sBITSET;
pbX: sINTEGER;
pbY: sINTEGER;
pbW: sINTEGER;
pbH: sINTEGER;
pbXc: sINTEGER;
pbYc: sINTEGER;
pbWc: sINTEGER;
pbHc: sINTEGER;
pbParm: SYSTEM.ADDRESS;
END;
TYPE PtrUSERBLK = POINTER TO USERBLK;
USERBLK = RECORD
ubCode: PROC;
ubPara: PtrPARMBLK;
END;
TYPE PtrICONBLK = POINTER TO ICONBLK;
ICONBLK = RECORD
ibPmask: SYSTEM.ADDRESS;
ibPdata: SYSTEM.ADDRESS;
ibPtext: POINTER TO ARRAY [0..255] OF CHAR;
ibChar: sINTEGER;
ibXchar: sINTEGER;
ibYchar: sINTEGER;
ibXicon: sINTEGER;
ibYicon: sINTEGER;
ibWicon: sINTEGER;
ibHicon: sINTEGER;
ibXtext: sINTEGER;
ibYtext: sINTEGER;
ibWtext: sINTEGER;
ibHtext: sINTEGER;
(* ibResvd: sINTEGER; Existiert anscheinend nicht *)
END;
TYPE PtrCICON = POINTER TO CICON;
CICON = RECORD
numplanes: sINTEGER; (* number of planes in the following data *)
coldata: SYSTEM.ADDRESS; (* ADDRESS to color bitmap in standard form *)
colmask: SYSTEM.ADDRESS; (* ADDRESS to single plane mask of col_data *)
seldata: SYSTEM.ADDRESS; (* ADDRESS to color bitmap of selected icon *)
selmask: SYSTEM.ADDRESS; (* ADDRESS to single plane mask of selected icon *)
nextres: PtrCICON; (* ADDRESS to next icon for a different resolution *)
END;
TYPE PtrCICONBLK = POINTER TO CICONBLK;
CICONBLK = RECORD
mono: ICONBLK; (* default monochrome icon *)
color: PtrCICON; (* list of color icons for different resolutions *)
END;
TYPE PtrObjcspec = POINTER TO Objcspec;
Objcspec = RECORD
CASE : sCARDINAL OF
0: address: SYSTEM.ADDRESS;|
1: Box: BoxInfo;|
(* Kein Pointer, steht direkt im Langwort! *)
2: TedPtr: PtrTEDINFO;|
3: StringPtr: PtrSTRING;|
4: ImagePtr: PtrBITBLK;|
5: UserDefPtr: PtrUSERBLK;|
6: IconPtr: PtrICONBLK;|
7: CiconPtr: PtrCICONBLK;|
8: obSpecPtr: PtrObjcspec;|
END;
END;
TYPE OBJECT = RECORD
obNext: sINTEGER;
obHead: sINTEGER;
obTail: sINTEGER;
obType: sINTEGER;
obFlags: sBITSET;
obState: sBITSET;
obSpec: Objcspec;
obX: sINTEGER;
obY: sINTEGER;
obWidth: sINTEGER;
obHeight: sINTEGER;
END;
(* Ab AES 4.0 *)
CONST
LK3DIND = 1;
LK3DACT = 2;
INDBUTCOL = 3;
ACTBUTCOL = 4;
BACKGRCOL = 5;
AD3DVALUE = 6;
PROCEDURE ObjcSysvar (obSmode, obSwhich, obSival1, obSival2 : INTEGER;
VAR obSoval1, obSoval2 : INTEGER): INTEGER;
(* immer vorhanden *)
PROCEDURE ObjcAdd (tree: SYSTEM.ADDRESS; parent, child: sINTEGER);
PROCEDURE ObjcDelete (tree: SYSTEM.ADDRESS; object: sINTEGER);
PROCEDURE ObjcDraw (tree: SYSTEM.ADDRESS; start, depth: sINTEGER; pxy: ARRAY OF LOC);
PROCEDURE ObjcFind (tree: SYSTEM.ADDRESS; start, depth, x, y: sINTEGER): sINTEGER;
PROCEDURE ObjcOffset (tree: SYSTEM.ADDRESS; object: sINTEGER; VAR x, y: sINTEGER);
PROCEDURE ObjcOrder (tree: SYSTEM.ADDRESS; object, newpos: sINTEGER);
CONST EDSTART = 0;
EDINIT = 1;
EDCHAR = 2;
EDEND = 3;
PROCEDURE ObjcEdit (tree: SYSTEM.ADDRESS; object: sINTEGER; VAR pos: sINTEGER;
char, kind: sINTEGER);
PROCEDURE ObjcChange (tree: SYSTEM.ADDRESS; object: sINTEGER; pxy: ARRAY OF LOC;
state: sBITSET; mode: sINTEGER);
(*-- AES-Appl --------------------------------------------------------*)
CONST Timer = Bit0;
Button = Bit1;
Mouse = Bit2;
Keyboard = Bit3;
TYPE RecordEntry = RECORD
kind: lBITSET; (* Siehe Timer .. Keyboard *)
event: lCARDINAL;
END;
PROCEDURE ApplInit (): sINTEGER;
PROCEDURE ApplRead (id, len: sINTEGER; VAR pipe: ARRAY OF LOC);
PROCEDURE ApplWrite (id, len: sINTEGER; VAR pipe: ARRAY OF LOC);
PROCEDURE ApplFind (name: SYSTEM.ADDRESS): sINTEGER;
CONST APFIRST = 0; (* Ersten Prozess suchen *)
APNEXT = 1; (* Nchsten Prozess suchen *)
APSHELL = 2; (* Nur nach System Shell suchen *)
APTSYSTEM = 1; (* Returntype: System process *)
APTAPP = 2; (* Returntype: Application *)
APTACC = 2; (* Returntype: Accessory *)
PROCEDURE ApplSearch (apSmode : sINTEGER; VAR apName : ARRAY OF CHAR; VAR apType, apId : sINTEGER) : BOOLEAN;
PROCEDURE ApplTplay (num, speed: sINTEGER; VAR buffer: ARRAY OF LOC);
PROCEDURE ApplTrecord (count: sINTEGER; VAR buffer: ARRAY OF LOC): sINTEGER;
PROCEDURE ApplBvset (disk, hard: sBITSET);
PROCEDURE ApplYield;
PROCEDURE ApplExit;
CONST AEFONT = 0; (* Get AES regular font information
* o1: font height, o2: font id,
* o3: font type: 0 - system font;
* 1 - fsm font;
* 2 and on to be defined in the future *)
AESMALL = 1; (* Get AES small font information. see above *)
AECOLOR = 2; (* Get AES current resolution number and the number
* of color is being supported by the object library
* o1: resolution number
* o2: number of color supported by AES object library
* o3: color icons: 0 - Not supported; 1 - supported
*)
AELANG = 3; (* o1: currently used language (see below) *)
L_ENGLISH = 0; (* Konstanten fr die einzelnen Sprachen *)
L_GERMAN = 1;
L_FRENCH = 2;
L_SPANISH = 4;
L_ITALIAN = 5;
L_SWEDISH = 6;
AEGLOBAL1 = 4;
(* Get general AES environment info #1
ap_gout1 - 0 - non-pre-emptive multitasking
1 - pre-emptive multitasking
ap_gout2 - 0 - appl_find cannot convert from MiNT to AES ids
1 - extended appl_find modes supported
ap_gout3 - 0 - appl_search not implemented
1 - appl_search implemented
ap_gout4 - 0 - rsrc_rcfix not implemented
1 - rsrc_rcfix implemented
*)
AEGLOBAL2 = 5;
(*
5 - General AES environment info #2
ap_gout1 - 0 - objc_xfind not implemented
1 - objc_xfind implemented
ap_gout2 - 0 - reserved, always 0
ap_gout3 - 0 - GEM/3 menu_click not implemented
1 - menu_click implemented
ap_gout4 - 0 - GEM/3 shel_r/wdef not implemented
1 - shel_r/wdef implemented
*)
AEGLOBAL3 = 6;
(*
6 - General AES environment info #3
ap_gout1 - 0 - appl_read(-1) not implemented
1 - appl_read(-1) implemented
ap_gout2 - 0 - shel_get(-1) not implemented
1 - shel_get(-1) implemented
ap_gout3 - 0 - menu_bar(-1) not implemented
1 - menu_bar(-1) implemented
ap_gout4 - 0 - menu_bar(MENU_INSTL) not implemented
1 - menu_bar(MENU_INSTL) implemented
*)
AERESVD = 7;
(*
7 - Reserved for OS extensions. MultiTOS sets
ap_gout1,2,3,4 to 0.
*)
AEMOUSE = 8;
(*
8 - Mouse support
ap_gout1 - 0 - graf_mouse modes 258-260 not supported
1 - graf_mouse modes 258-260 supported
ap_gout2 - 0 - application must maintain mouse form
1 - mouse form maintained by OS on a per-application
basis
*)
AEMENUS = 9;
(*
9 - Menu support
ap_gout1 - 0 - submenus not supported
1 - MultiTOS style submenus
ap_gout2 - 0 - popup menus not supported
1 - MultiTOS style popup menus
ap_gout3 - 0 - scrollable menus not supported
1 - MultiTOS style scrollable menus
ap_gout4 - 0 - extended MN_SELECTED not supported
1 - words 5/6/7 in MN_SELECTED message give extra info
*)
AESHELLW = 10;
(*
10 - shel_write info
ap_gout1 - shel_write modes supported:
bit 0-7: indicates highest legal value for
(sh_wdoex & 0x00ff)
bit 8-15: indicates which bits in (sh_wdoex & 0xFF00)
are supported as in MultiTOS
ap_gout2 - 0 - shel_write(0) launches an application
1 - shel_write(0) cancels previous shel_write
ap_gout3 - 0 - shel_write(1) launches an application immediately
1 - shel_write(1) takes effect after current application
exits (like TOS 1.4)
ap_gout4 - 0 - ARGV parameter passing not possible
1 - sh_wiscr controls ARGV parameter passing
*)
AEWINDOWS = 11;
(*
11 - window support
ap_gout1 - extended WF_ functions available in wind_get/set
(0=not available, 1=available)
bit 0: WF_TOP returns window below current one
bit 1: wind_get(WF_NEWDESK) supported
bit 2: WF_COLOR get/set supported
bit 3: WF_DCOLOR get/set supported
bit 4: WF_OWNER supported in wind_get
bit 5: WF_BEVENT get/set supported
bit 6: WF_BOTTOM supported
bit 7: WF_ICONIFY supported
bit 8: WF_UNICONIFY supported
bits 9-15 reserved, 0
ap_gout2 - reserved, 0
ap_gout3 - new gadgets supported:
(0=supported, 1=not supported)
bit 0: iconifier
bit 1: explicit "bottomer" gadget
bit 2: shift+click to send window to bottom
bit 3: "hot" close box
all other bits: reserved, 0
ap_gout4 - 0 - wind_update check and set not allowed
1 - wind_update check and set allowed
*)
AEMESSAGES = 12;
(*
12 - messages sent to applications
ap_gout1 - bit field of extra messages supported (1)
(0=no,1=yes)
bit 0: WM_NEWTOP message meaningful
bit 1: WM_UNTOPPED message sent
bit 2: WM_ONTOP message sent
bit 3: AP_TERM message sent
bit 4: MultiTOS shutdown and resolution change
messages supported
bit 5: AES sends CH_EXIT
bit 6: WM_BOTTOM message sent
bit 7: WM_ICONIFY message sent
bit 8: WM_UNICONIFY message sent
bit 9: WM_ALLICONIFY message sent
ap_gout2 - bit field of extra messages supported (2)
(currently all bits are reserved and 0)
ap_gout3 - message behaviour
bit 0: WM_ICONIFY message gives coordinates (0=no,1=yes)
*)
AEOBJECTS = 13;
(*
13 - object information
ap_gout1 - 0 - no 3D objects
1 - 3D objects supported via objc_flags
ap_gout2 - 0 - objc_sysvar supported
1 - MultiTOS 1.01 objc_sysvar
2 - extended objc_sysvar
ap_gout3 - 0 - only system font for TEDINFO structures
1 - SPEEDO and GDOS fonts allowed in TEDINFO
ap_gout4 - reserved for OS extensions (MultiTOS always
sets this to 0)
suggestion: use this to indicate presence
of new object types like radio buttons
*)
AEFORMS = 14;
(*
14 - form library information
ap_gout1 - 0 - no flying dialogs
1 - flying dialogs supported
ap_gout2 - 0 - keyboard tables not supported
1 - Mag!X style keyboard tables
ap_gout3 - 0 - last cursor position not returned
1 - last cursor position returned
ap_gout4 - reserved, 0
*)
PROCEDURE ApplGetinfo (info: sINTEGER; VAR out1, out2, out3, out4 : sINTEGER): sINTEGER;
(*-- AES-Evnt --------------------------------------------------------*)
CONST KRSHIFT = Bit0; (* Tastatur-Status *)
KLSHIFT = Bit1;
KCTRL = Bit2;
KALT = Bit3;
KCAPS = Bit4; (* Fr AES undokumentiert! *)
PROCEDURE EvntKeybd (VAR taste, scan: sINTEGER; VAR ascii: CHAR);
PROCEDURE EvntButton (maxclicks: sINTEGER;
mask, state: sBITSET;
VAR x, y: sINTEGER;
VAR button, kbshift: sBITSET): sINTEGER;
CONST EnterRect = 0;
LeaveRect = 1;
PROCEDURE EvntMouse (mode: sINTEGER; VAR m1rect: ARRAY OF LOC;
VAR x, y: sINTEGER; VAR button, kbshift: sBITSET);
CONST MNSELECTED = 10; (* Eventmessages *)
WMREDRAW = 20;
WMTOPPED = 21;
WMCLOSED = 22;
WMFULLED = 23;
WMARROWED = 24;
WAUPPAGE = 0;
WADNPAGE = 1;
WAUPLINE = 2;
WADNLINE = 3;
WALFPAGE = 4;
WARTPAGE = 5;
WALFLINE = 6;
WARTLINE = 7;
WMHSLID = 25;
WMVSLID = 26;
WMSIZED = 27;
WMMOVED = 28;
WMNEWTOP = 29;
WMUNTOPPED = 30;
ACOPEN = 40;
ACCLOSE = 41;
CTUPDATE = 50;
CTMOVE = 51;
CTNEWTOP = 52;
(* In Mag!X: *)
WMBDROPPED = 100;
(* Ab AES V4.0 *)
(* WMUNTOPPED = 30; ist schon definiert *)
WMONTOP = 31;
APTERM = 50;
APTFAIL = 51;
APRESCHG = 57;
SHUTCOMPLETED = 60;
RESCHCOMPLETED = 61;
CHEXIT = 90;
(* Ab irgendwann *)
SCCHANGED = 80;
SCFINDEF = {}; (* Nichts definiert *)
SCFDBASE = Bit0; (* data to be loaded into a database
(".DBF", ".CSV", ...)
*)
SCFTEXT = Bit2; (* text files
(".TXT", ".ASC", ".RTF", ".DOC", ...)
*)
SCFVECTOR = Bit3; (* vector graphics
(".GEM", ".EPS", ".CVG", ".DXF", ...)
*)
SCFRASTER = Bit4; (* bitmap graphics
(".IMG", ".TIF", ".GIF", ".PCX", ".IFF", ...)
*)
SCFSHEET = Bit5; (* spreadsheet data
(".DIF", ".WKS", ...)
*)
SCFSOUND = Bit6; (* samples, MIDI files, sound, ...
(".MOD", ".SND", ...)
*)
(*
SC_CHANGED-DEFINITION
After an application created a new file in the scrap directory or changed
its contents it should send the message SC_CHANGED to all other apps in
the system.
When using old versions of TOS known protocols (XAcc/AV) can be used,
newer versions support appl_search and/or AES broadcast (shel_write(7, ..).
The last method is the recommended one if available.
The message looks like:
msg[0] = SC_CHANGED (Suggestion: 80 or 91)
msg[1] = apID
msg[2] = 0
msg[3] = bitmap representing the file format (following)
msg[4] 4 characters for the "best" format (e.g. ".RTF")
+ = with the least loss of information
msg[5] when importing the data
msg[6]
+ = reserved, 0
msg[7]
The following constants characterize the file format. Avoid using
SCF_INDEF whenever you can!
SCF_INDEF = $0000;
SCF_DBASE = $0001; data to be loaded into a database
(".DBF", ".CSV", ...)
SCF_TEXT = $0002; text files
(".TXT", ".ASC", ".RTF", ".DOC", ...)
SCF_VECTOR = $0004; vector graphics
(".GEM", ".EPS", ".CVG", ".DXF", ...)
SCF_RASTER = $0008; bitmap graphics
(".IMG", ".TIF", ".GIF", ".PCX", ".IFF", ...)
SCF_SHEET = $0010; spreadsheet data
(".DIF", ".WKS", ...)
SCF_SOUND = $0020; samples, MIDI files, sound, ...
(".MOD", ".SND", ...)
After examining this bit vector an application can decide to look for
the data in the scrap path or not. More than one bit can be set when
combined data were stored (e.g. bitmap and vector data in
one file).
There is no reply message to SC_CHANGED.
*)
(* Ab AES V4.1 *)
WMBOTTOMED = 33;
WMICONIFY = 34;
WMUNICONIFY = 35;
WMALLICONIFY = 36;
WMTOOLBAR = 37;
(* Fr Drag & Drop Protokoll in MultiTOS (ab AES V 4.0) *)
AP_DRAGDROP = 63;
DD_OK = 0;
DD_NAK = 1;
DD_EXT = 2;
DD_LEN = 3;
DD_TRASH = 4;
DD_PRINTER = 5;
DD_CLIPBOARD = 6;
(* timeout in milliseconds *)
DD_TIMEOUT = 4000;
(* number of bytes of "preferred
* extensions" sent by receipient during
* open
*)
DD_NUMEXTS = 8;
DD_EXTSIZE = 32L;
(* max size of a drag&drop item name *)
DD_NAMEMAX = 128;
(* max length of a drag&drop header *)
DD_HDRMAX = (8+DD_NAMEMAX);
PROCEDURE EvntMesag (VAR buffer: ARRAY OF LOC);
PROCEDURE EvntTimer (count: lCARDINAL);
CONST MUKEYBD = Bit0; (* Event-Typen *)
MUBUTTON = Bit1;
MUM1 = Bit2;
MUM2 = Bit3;
MUMESAG = Bit4;
MUTIMER = Bit5;
PROCEDURE EvntMulti (wich: sBITSET;
maxclicks: sINTEGER;
mask, state: sBITSET;
m1mode: sINTEGER;
m1rect: ARRAY OF LOC;
m2mode: sINTEGER;
m2rect: ARRAY OF LOC;
VAR msgBuff: ARRAY OF LOC;
loTimer, hiTimer: sINTEGER;
VAR x, y: sINTEGER;
VAR button: sBITSET;
VAR taste: sINTEGER;
VAR kbshift: sBITSET;
VAR scan: sINTEGER;
VAR ascii: CHAR;
VAR clicks: sINTEGER): sBITSET;
PROCEDURE EvntPmulti (): sBITSET;
(* Gem der Anregung im Profibuch wird dieses zustzliche Binding angeboten.
* Dabei mu man selbst die bentigten Parameter in die IntIn- und AddrIn-
* Array schreiben und nach Aufruf der Funktion auch den IntOut-Array
* auswerten. Dieses Vorgehen spart in der Regel Zeit, da die ganzen Para-
* meter von EvntMulti gar nicht erst auf den Stack gepackt werden mssen.
*
* Ein undokumentiertes Feature ist, da man nicht alle Parameter setzen mu,
* wenn man nur auf zwei oder drei Events wartet.
*)
PROCEDURE EvntDclicks (new: sINTEGER; set: BOOLEAN): sINTEGER;
(*-- AES-Form -----------------------------------------------------------*)
PROCEDURE FormDo (tree: SYSTEM.ADDRESS; start: sINTEGER): sINTEGER;
CONST FMDSTART = 0;
FMDGROW = 1;
FMDSHRINK = 2;
FMDFINISH = 3;
PROCEDURE FormDial (flag: sINTEGER; small, big: ARRAY OF LOC);
PROCEDURE FormAlert (button: sINTEGER; string: ARRAY OF CHAR): sINTEGER;
PROCEDURE FormError (errNum: sINTEGER);
PROCEDURE FormCenter (tree: SYSTEM.ADDRESS; VAR rect: ARRAY OF LOC);
PROCEDURE FormKeybd (tree: SYSTEM.ADDRESS; object, chin: sINTEGER;
VAR nextObj, chout: sINTEGER): sINTEGER;
PROCEDURE FormButton (tree: SYSTEM.ADDRESS; object, clicks: sINTEGER;
VAR next: sINTEGER): sINTEGER;
(*-- AES-FSel -----------------------------------------------------------*)
PROCEDURE FselInput (VAR pfad, name: ARRAY OF CHAR): BOOLEAN;
PROCEDURE FselExinput (VAR info, pfad, name: ARRAY OF CHAR): BOOLEAN;
(*-- AES-Graf -----------------------------------------------------------*)
PROCEDURE GrafRubberbox (x, y, mw, mh: sINTEGER; VAR lw, lh: sINTEGER);
PROCEDURE GrafDragbox (moving, boundary: ARRAY OF LOC; VAR x, y: sINTEGER);
PROCEDURE GrafMovebox (rect: ARRAY OF LOC; dx, dy: sINTEGER);
PROCEDURE GrafGrowbox (source, dest: ARRAY OF LOC);
PROCEDURE GrafShrinkbox (source, dest: ARRAY OF LOC);
PROCEDURE GrafWatchbox (tree: SYSTEM.ADDRESS; item: sINTEGER;
in, out: sBITSET): sINTEGER;
CONST Horizontal = 0;
Vertical = 1;
PROCEDURE GrafSlidebox (tree: SYSTEM.ADDRESS; parent, object: sINTEGER;
dir: sINTEGER): sINTEGER;
PROCEDURE GrafHandle (VAR handle, wCh, hCh, wbox, hbox: sINTEGER);
CONST ARROW = 0;
TEXTCRSR = 1;
BUSYBEE = 2;
POINTHAND = 3;
FLATHAND = 4;
THINCROSS = 5;
THICKCROSS = 6;
OUTLCROSS = 7;
USERDEF = 255;
MOFF = 256;
MON = 257;
PROCEDURE GrafMouse (form: sINTEGER; user: SYSTEM.ADDRESS);
PROCEDURE GrafMkstate (VAR x, y: sINTEGER; VAR button, kbshift: sBITSET);
(*-- AES-Menu -----------------------------------------------------------*)
CONST Reset = 0;
Set = 1;
Ask = -1;
PROCEDURE MenuBar (tree: SYSTEM.ADDRESS; action: sINTEGER) : sINTEGER;
PROCEDURE MenuIcheck (tree: SYSTEM.ADDRESS; item, action: sINTEGER);
PROCEDURE MenuIenable (tree: SYSTEM.ADDRESS; item, action: sINTEGER);
PROCEDURE MenuTnormal (tree: SYSTEM.ADDRESS; item, action: sINTEGER);
(* Aus welchen Grnden auch immer: Bei action sind reset und set vertauscht *)
PROCEDURE MenuText (tree: SYSTEM.ADDRESS; item: sINTEGER; str: ARRAY OF CHAR);
PROCEDURE MenuRegister (apid: sINTEGER; VAR str: ARRAY OF CHAR) : sINTEGER;
(* 2.01: Mu VAR-Parameter sein, da sonst der String nicht im Men gesetzt
* werden kann!
*)
PROCEDURE MenuUnregister (apid: sINTEGER);
(* Ab AES V 4.0: *)
TYPE MENU = RECORD
tree: SYSTEM.ADDRESS; (* object tree pointer *)
menu: sINTEGER; (* parent object of menu items *)
item: sINTEGER; (* starting menu item *)
scroll: sINTEGER; (* scroll field status of the menu *)
kstate: sBITSET; (* The CTRL, ALT, SHIFT Key state at the
* time the mouse button was pressed
*)
END;
MenuSetting = RECORD
Display: lINTEGER; (* the submenu display delay *)
Drag: lINTEGER; (* the submenu drag delay *)
Delay: lINTEGER; (* the single-click scroll delay *)
Speed: lINTEGER; (* the continuous scroll delay *)
Height: sINTEGER; (* the menu scroll height *)
END;
PROCEDURE MenuPopup (VAR meMenu: MENU; meXpos, meYpos : sINTEGER;
VAR meMData: MENU): sINTEGER;
PROCEDURE MenuAttach (flag: sINTEGER; tree: SYSTEM.ADDRESS; item: sINTEGER;
VAR meMData : MENU): sINTEGER;
PROCEDURE MenuIstart (flag: sINTEGER; tree: SYSTEM.ADDRESS; imenu, item : sINTEGER): sINTEGER;
PROCEDURE MenuSettings (flag: sINTEGER; VAR values: MenuSetting): sINTEGER;
(*-- AES-Rsrc -----------------------------------------------------------*)
PROCEDURE RsrcLoad (name: ARRAY OF CHAR): BOOLEAN;
PROCEDURE RsrcFree;
CONST RTREE = 0;
ROBJECT = 1;
RTEDINFO = 2;
RICONBLK = 3;
RBITBLK = 4;
RSTRING = 5;
RIMAGEDATA = 6;
ROBSPEC = 7;
RTEPTEXT = 8;
RTEPTMPLT = 9;
RTEPVALID = 10;
RIBPMASK = 11;
RIBPDATA = 12;
RIBPTEXT = 13;
RBIDATA = 14;
RFRSTR = 15;
RFRIMG = 16;
PROCEDURE RsrcGaddr (type, item: sINTEGER): SYSTEM.ADDRESS;
PROCEDURE RsrcSaddr (type, item: sINTEGER; tree: SYSTEM.ADDRESS);
PROCEDURE RsrcObfix (tree: SYSTEM.ADDRESS; object: sINTEGER);
PROCEDURE RsrcRcfix (rsrc: SYSTEM.ADDRESS);
(*-- AES-Scrp -----------------------------------------------------------*)
CONST scCSV = Bit0;
scTXT = Bit1;
scGEM = Bit2;
scIMG = Bit3;
scDCA = Bit4;
scUSR = Bit5;
PROCEDURE ScrpRead (VAR pfad: ARRAY OF CHAR): sBITSET;
(* Funktioniert nicht auf die beschriebene Art mit dem ST/E/TT GEM *)
PROCEDURE ScrpWrite (pfad: ARRAY OF CHAR);
PROCEDURE ScrpClear;
(*-- AES-Shel -----------------------------------------------------------*)
PROCEDURE ShelRead (VAR command, path: ARRAY OF CHAR);
CONST NoProg = 0;
NewProg = 1;
CONST NoGraphic = 0;
Graphic = 1;
CONST Now = 0;
End = 1;
PROCEDURE ShelWrite (exec, appl, start: sINTEGER; command, path: ARRAY OF CHAR): sINTEGER;
CONST
(* Ab AES V4.0 *)
NewApp = 1;
NewAcc = 3;
ExecShutdown = 4;
RequestResChange = 5;
BroadcastMessage = 7;
AESEnvironment = 8;
InformAES = 9;
SendMsgToAES = 10;
(* Bits fr extended modes in AES V4.0 (high byte of exec), mode 1 *)
CONST PsetLimit = 8;
Prenice = 9;
DefaultDir = 10;
Environment = 11;
(* Bits fr die Messages, die die Application versteht *)
CONST ApTermBit = 0;
CONST NoShutdown = 0;
PartialShutdown = 1;
CompleteShutdown = 2;
CONST InquireEnvSize = 0;
ChangeEnv = 1;
CopyEnv = 2;
CONST
(* Ab AES V4.0 *)
DoNoArgv = 0;
DoArgv = 1;
PROCEDURE ExtShelWrite (mode, appl, start: sINTEGER; command : SYSTEM.ADDRESS; path: ARRAY OF CHAR) : sINTEGER;
PROCEDURE ShelGet (len: sINTEGER; VAR buffer: ARRAY OF LOC) : sINTEGER;
(* Ab AES V 4.0: Gibt Lnge des Buffers zurck *)
PROCEDURE ShelPut (len: sINTEGER; VAR buffer: ARRAY OF LOC);
PROCEDURE ShelFind (VAR name: ARRAY OF CHAR);
PROCEDURE ShelEnvrn (VAR param: ARRAY OF CHAR; name: ARRAY OF CHAR);
PROCEDURE ShelRdef (command, path: ARRAY OF CHAR);
PROCEDURE ShelWdef (command, path: ARRAY OF CHAR);
(*-- AES-Wind -----------------------------------------------------------*)
CONST NAME = Bit0;
CLOSER = Bit1;
FULL = Bit2;
MOVE = Bit3;
INFO = Bit4;
Size = Bit5; (* SIZE ist reserviertes Wort *)
UPARROW = Bit6;
DNARROW = Bit7;
VSLIDE = Bit8;
LFARROW = Bit9;
RTARROW = Bit10;
HSLIDE = Bit11;
HOTCLOSEBOX = Bit12; (* Was immer das auch ist... *)
BACKDROP = Bit13; (* Backdrop-Button unter Mag!X *)
SMALLER = Bit14; (* Iconify-Gadget *)
PROCEDURE WindCreate (comp: sBITSET; size: ARRAY OF LOC): sINTEGER;
PROCEDURE WindOpen (handle: sINTEGER; size: ARRAY OF LOC);
PROCEDURE WindClose (handle: sINTEGER);
PROCEDURE WindDelete (handle: sINTEGER);
CONST WFRESVD1 = 1;
WFNAME = 2;
WFINFO = 3;
WFWORKXYWH = 4;
WFCURRXYWH = 5;
WFPREVXYWH = 6;
WFFULLXYWH = 7;
WFHSLIDE = 8;
WFVSLIDE = 9;
WFTOP = 10;
WFFIRSTXYWH = 11;
WFNEXTXYWH = 12;
WFRESVD13 = 13;
WFNEWDESK = 14;
WFHSLSIZE = 15;
WFVSLSIZE = 16;
WFSCREEN = 17;
WFATTRIB = 18;
WFSIZTOP = 19;
(* Ab AES V4.0 *)
WFCOLOR = 18;
WFDCOLOR = 19;
WFOWNER = 20;
WFBEVENT = 24;
WFBOTTOM = 25;
(* Ab AES V4.1 *)
WFICONIFY = 26;
WFUNICONIFY = 27;
WFUNICONIFYXYWH = 28;
WFTOOLBAR = 30;
WFFTOOLBAR = 31;
WFNTOOLBAR = 32;
(* Mag!X-spezifisch *)
WFMBACKDROP = 100;
(* Ab AES V3.2 (TOS 2.0x, 3.0x) *)
WBOX = 0; (* IBOX window parent object *)
WTITLE = 1; (* BOX parent of closer, namer, fuller *)
WCLOSER = 2; (* BOXCHAR close box *)
WNAME = 3; (* BOXTEXT mover bar *)
WFULLER = 4; (* BOXCHAR full box *)
WINFO = 5; (* BOXTEXT info line *)
WDATA = 6; (* IBOX holds remaining window elements *)
WWORK = 7; (* IBOX application work area *)
WSIZER = 8; (* BOXCHAR sizer box *)
WVBAR = 9; (* BOX holds vertical slider elements *)
WUPARROW = 10; (* BOXCHAR vert. slider up arrow *)
WDNARROW = 11; (* BOXCHAR vert. slider down arrow *)
WVSLIDE = 12; (* BOX vert. slider background *)
WVELEV = 13; (* BOX vert. slider thumb/elevator *)
WHBAR = 14; (* BOX holds horizontal slider elements *)
WLFARROW = 15; (* BOXCHAR horz. slider left arrow *)
WRTARROW = 16; (* BOXCHAR horz. slider right arrow *)
WHSLIDE = 17; (* BOX horz. slider background *)
WHELEV = 18; (* BOX horz. slider thumb/elevator *)
PROCEDURE WindGet (handle, typ: sINTEGER; VAR para: ARRAY OF LOC);
PROCEDURE WindSet (handle, typ: sINTEGER; para: ARRAY OF LOC);
PROCEDURE WindFind (x, y: sINTEGER): sINTEGER;
CONST ENDUPDATE = 0;
BEGUPDATE = 1;
ENDMCTRL = 2;
BEGMCTRL = 3;
BEGCHKUPDATE = 257;
BEGCHKMCTRL = 259;
PROCEDURE WindUpdate (mode: sINTEGER);
CONST WCBORDER = 0;
WCWORK = 1;
PROCEDURE WindCalc (mode: sINTEGER; comp: sBITSET; VAR in, out: ARRAY OF LOC);
PROCEDURE WindNew;
(*--- AES-XGraf ---------------------------------------------------------*)
PROCEDURE XgrfStepcalc (ow, oh, x, y, w, h: sINTEGER;
VAR cx, cy, count, xstep, ystep: sINTEGER);
PROCEDURE Xgrf2box (xc, yc, wc, hc, corners, count, xstep, ystep, doubled: sINTEGER);
PROCEDURE InitAES;
(* Init-Prozedur. Wird im Modulkrper ausgefhrt, und braucht nicht weiter
* beachtet werden.
*)
END MagicAES.